package swingtest;

import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.FlowLayout;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JSlider;

public class J_SliderAndPanel {

	public static void main(String[] args) {
		JFrame app = new JFrame("J_SliderAndPanel");
		app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		app.setSize(360, 400);
		app.setLocationByPlatform(true);
		
		Container container = app.getContentPane();
		container.setLayout(new FlowLayout(FlowLayout.LEFT));
		
		JSlider slider1 = new JSlider(JSlider.HORIZONTAL, 0, 100, 10);
		container.add(slider1);
		JSlider slider2 = new JSlider(JSlider.VERTICAL, 0, 100, 10);
		container.add(slider2);

		JPanel panel = new JPanel();
		panel.setPreferredSize(new Dimension(100, 60));
		panel.setBackground(Color.green);
		container.add(panel);
		
		app.setVisible(true);

	}

}
